import request from "@/utils/request";

// 查询学生信息列表
export function listStudent(query, id) {
  return request({
    url: "/student/student/list",
    method: "get",
    params: query,
    headers: {
      userId: id,
    },
  });
}

// 查询学生信息详细
export function getStudent(studentId) {
  return request({
    url: "/student/student/" + studentId,
    method: "get",
  });
}

// 新增学生信息
export function addStudent(data) {
  return request({
    url: "/student/student",
    method: "post",
    data: data,
  });
}

// 修改学生信息
export function updateStudent(data) {
  return request({
    url: "/student/student",
    method: "put",
    data: data,
  });
}

// 删除学生信息
export function delStudent(studentId) {
  return request({
    url: "/student/student/" + studentId,
    method: "delete",
  });
}
export function meBySID(id) {
  return request({
    url: `/student/student/meBySID?id=${id}`,
    method: "get",
  });
}
